<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title><?php echo $appTitle;?></title>
    <!-- easyui js -->
    <script type="text/javascript" src="/static/Easyui/jquery.min.js"></script>
    <script type="text/javascript" src="/static/Easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="/static/Easyui/jquery.insdep-extend.min.js"></script>
    <script type="text/javascript" src="/static/Js/tools.js"></script>
    <script type="text/javascript" src="/static/Js/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript" src="/static/Js/jquery.base64.js"></script>

    <!-- 富文本编辑器 -->
    <link href="/ueditor/themes/default/css/umeditor.css" type="text/css" rel="stylesheet">
    <script type="text/javascript" src="/ueditor/umeditor.min.js"></script>
    <script type="text/javascript" src="/ueditor/third-party/template.min.js"></script>
    <script type="text/javascript" src="/ueditor/umeditor.config.js"></script>

    <!-- 拖动上传 -->
    <script type="text/javascript" src="/static/Js/plupload/moxie.js"></script>
    <script type="text/javascript" src="/static/Js/plupload/plupload.dev.js"></script>
    <script type="text/javascript" src="/static/Js/plupload/i18n/zh_CN.js"></script>
    <script type="text/javascript" src="/static/Js/qiniu.js"></script>
    <script type="text/javascript" src="/static/Js/ui.js"></script>

    <!-- Vue&图表 -->
    <script type="text/javascript" src="/js/vue.min.js"></script>
    <script type="text/javascript" src="/js/echarts.js"></script>

    <!-- 图片浏览 -->
    <script type="text/javascript" src="/static/gallery/jquery.blueimp-gallery.min.js"></script>
    <link rel="stylesheet" type="text/css" href="/static/gallery/blueimp-gallery.min.css">

    <!-- 特殊样式文件 -->
    <link rel="stylesheet" type="text/css" href="//at.alicdn.com/t/font_1544735_dyyx398v7jd.css">
    <link rel="stylesheet" type="text/css" href="/static/Easyui/themes/2019/icon.css">
    <link rel="stylesheet" type="text/css" href="/static/Easyui/themes/2019/easyui.css">
    <link rel="stylesheet" type="text/css" href="/static/Easyui/themes/2019/css/default.css">
    <link rel="stylesheet" type="text/css" href="/static/Easyui/themes/2019/css/style/green.css" id="themeLink">
    <script type="text/javascript" src="/static/Easyui/themes/2019/js/common.js"></script>
    <script type="text/javascript" src="/static/Easyui/themes/2019/js/skin.js"></script>
    <script type="text/javascript" src="/static/Easyui/themes/2019/js/layer/layer.js"></script>
</head>
<body>
<div id="master-layout">

    <div data-options="region:'north',border:false,bodyCls:'master-header-layout'">
        <div class="header top">

            <div class="headtop">
                <span class="logo" id="logo"><?php echo $appTitle;?></span>
                <ul class="nav">
                    <li><a href="#" @click="addTab('首页');">首页</a></li>

                    <template v-for="(vo,index) in menus">
                        <li v-if="vo.id==menuUp"><a href="#" class="selected">{{vo.title}}</a></li>
                        <li v-else @click="menuUp=vo.id"><a href="#">{{vo.title}}</a></li>
                    </template>
                </ul>

                <div class="topright">
                    <div class="user">
                        <span style="background-color:#555">
                            <a href="#"><i class="iconfont icon-geren"></i> Admin<i class="iconfont icon-xiala"></i></a>
                        </span>
                        <ul class="userlist">
                            <li><a href="#"><i class="iconfont icon-rongna"></i> 用户信息</a></li>
                            <li><a href="javascript:" @click="addTab('修改密码', '/admin/main/changepwd')"><i class="iconfont icon-mima"></i> 修改密码</a></li>
                            <li><a href="javascript:" @click="logout()"><i class="iconfont icon-tuichu"></i> 退出</a></li>
                        </ul>
                    </div>
                    <div class="skin">
                        <a href="#">更新主题</a>
                        <ul class="skinlist">
                            <li><a href="#" data-value="green" class="targetElem green"></a></li>
                            <li><a href="#" data-value="darkblue" class="targetElem darkblue"></a></li>
                            <li><a href="#" data-value="orange" class="targetElem orange"></a></li>
                            <li><a href="#" data-value="lightgreen" class="targetElem lightgreen"></a></li>
                            <li><a href="#" data-value="black" class="targetElem black"></a></li>
                            <li><a href="#" data-value="darkgrey" class="targetElem darkgrey"></a></li>
                            <li><a href="#" data-value="lightblue" class="targetElem lightblue"></a></li>
                            <li><a href="#" data-value="red" class="targetElem red"></a></li>
                        </ul>
                    </div>
                </div>
            </div>


            <div class="headdown">
                <template v-for="(vo,index) in navs">
                    <ul class="menu">
                        <template v-for="vx in vo.submenu">
                            <li><a href="javascript:void(0);" @click="addTab(vx.title,vx.links)"><i :class="'iconfont '+vx.icon+' icon'+(index+1)"></i>{{vx.title}}</a></li>
                        </template>
                    </ul>
                </template>
            </div>
        </div>
    </div>

    <div data-options="region:'west',split:true,border:false" style="width:205px;">
        <div data-options="fit:true,border:true" class="easyui-accordion left">
            <ul class="leftmenu navMenu">
                <template v-for="vo in menus">
                    <li v-for="vx in vo.submenu" v-if="vx.up==menuUp"><a href="javascript:" :data-href="vx.links" :title="vx.title" target="right"><i :class="'iconfont '+vx.icon"></i>{{vx.title}}</a></li>
                </template>
            </ul>
        </div>
    </div>

    <div data-options="region:'center',border:false">
        <div id="rightTabs" class="easyui-tabs" data-options="fit:true,border:false">
            <div title="首页" data-options="closable:false,href:'/admin/main/main/'"></div>
        </div>
    </div>

    <div data-options="region:'south',split:false" class="footer">
        <span class="fleft">通用后台v1.0</span>
        <span class="fright">2019<i class="iconfont icon-icon-test"></i></span>
    </div>

    <div id="mm" class="easyui-menu" style="width:150px;">
        <div id="mm-tabclose">关闭</div>
        <div id="mm-tabcloseall">全部关闭</div>
        <div id="mm-tabcloseother">除此之外全部关闭</div>
        <div class="menu-sep"></div>
        <div id="mm-tabcloseright">当前页右侧全部关闭</div>
        <div id="mm-tabcloseleft">当前页左侧全部关闭</div>
        <div class="menu-sep"></div>
        <div id="mm-exit">退出</div>
    </div>
    <div id="blueimp-gallery" class="blueimp-gallery">
        <div class="slides"></div>
        <h3 class="title"></h3>
        <a class="prev">‹</a>
        <a class="next">›</a>
        <a class="close">×</a>
        <a class="play-pause"></a>
        <ol class="indicator"></ol>
    </div>
</div>
</body>
</html>
<script>
    $(function () {
        $('#master-layout').layout({
            fit: true
        });
        gallery();
    });
    var indexVm = new Vue({
        el: '#master-layout',
        data: {
            appTitle: '<?php echo $appTitle;?>',
            username: '<?php echo $username;?>',
            domain: '<?php echo $domain;?>',
            messageNum: '<?php echo $messageNum;?>',
            navs: JSON.parse('<?php echo json_encode($navs, JSON_UNESCAPED_UNICODE);?>'),
            menus: JSON.parse('<?php echo json_encode($menus, JSON_UNESCAPED_UNICODE);?>'),
            menuUp: 1
        },
        methods: {
            init: function () {
            },
        },
        updated: function () {
            InitLeftMenu();
        }
    });
    indexVm.init();
</script>
